# Windows PowerShell 开发脚本：同时启动 UI 包和其他项目
Write-Host "🚀 启动 UI 包开发模式..." -ForegroundColor Green

# 启动 UI 包的开发模式
Write-Host "📦 启动 @repo/ui 开发模式..." -ForegroundColor Yellow
Start-Process powershell -ArgumentList "-NoExit", "-Command", "cd packages/ui; pnpm dev" -WindowStyle Normal

# 等待 UI 包初始化
Start-Sleep -Seconds 3

# 启动其他项目
Write-Host "🌐 启动 Web 项目..." -ForegroundColor Yellow
Start-Process powershell -ArgumentList "-NoExit", "-Command", "cd apps/web; pnpm dev" -WindowStyle Normal

Write-Host "📱 启动 Taro 项目..." -ForegroundColor Yellow
Start-Process powershell -ArgumentList "-NoExit", "-Command", "cd apps/taro-project; pnpm dev:next" -WindowStyle Normal

Write-Host "✅ 所有项目已启动！" -ForegroundColor Green
Write-Host "📦 UI 包: packages/ui" -ForegroundColor Cyan
Write-Host "🌐 Web 项目: apps/web (端口 3000)" -ForegroundColor Cyan
Write-Host "📱 Taro 项目: apps/taro-project" -ForegroundColor Cyan
Write-Host ""
Write-Host "💡 提示：每个项目都在独立的 PowerShell 窗口中运行" -ForegroundColor Magenta
Write-Host "💡 关闭对应的窗口即可停止对应服务" -ForegroundColor Magenta 